const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  outputDir: process.env.VUE_APP_FILE_NAME,
  publicPath: process.env.NODE_ENV === "development" ? "/" : "/sys",
  devServer: {
    historyApiFallback: true,
    port: 8035,
    client: {
      overlay: false
    },
    proxy: {
      "/api": {
        target: "https://jz.verjs.cn/",
        secure: true,
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      },
      "/socket": {
        target: "https://jz.verjs.cn/wss",
        secure: true,
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          '^/socket': ''
        }
      },
      "/jz_image": {
        target: "https://jz.verjs.cn",
        secure: true,
        changeOrigin: true,
        pathRewrite: {
          '^/jz_image': ''
        }
      }
    }
  }
})
